/* src/assets/main.css */

/* ---- 全局重置与基础样式 ---- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #F7F8FA;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ---- 首页样式 ---- */
.header-section {
  margin-bottom: 32px;
  text-align: center;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: #333;
}

.page-subtitle {
  font-size: 16px;
  color: #999;
  margin-top: 8px;
  margin-bottom: 24px;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 40px;
  padding: 0 20px;
  height: 48px;
  border: 1px solid #EFEFEF;
  max-width: 600px;
  margin: 0 auto;
}

.search-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  background: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.card {
  display: block;
  text-decoration: none;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(100, 100, 100, 0.08);
  overflow: hidden;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(100, 100, 100, 0.12);
}

.card-image {
  width: 100%;
  padding-top: 100%; /* 关键：实现1:1正方形 */
  position: relative;
  background-color: #f0f2f5;
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 类似于 aspectFill */
}

.card-name {
  padding: 16px;
  font-size: 16px;
  color: #333;
  text-align: center;
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding-top: 80px;
}

.empty-image {
  width: 150px;
  height: 150px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  color: #999;
}

/* ---- 详情页样式 ---- */
.detail-header {
  margin-bottom: 32px;
  text-align: center;
  position: relative;
}

.back-button {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  text-decoration: none;
  color: #555;
  font-size: 16px;
}

.image-list img {
  width: 100%;
  display: block;
  margin-bottom: 16px;
  border-radius: 8px;
}

.loading-state {
  text-align: center;
  color: #999;
  padding: 40px;
}